package com.gr.labbackend.service.Impl.manage.events;

import com.alibaba.fastjson.JSONObject;
import com.gr.labbackend.mapper.EventMapper;
import com.gr.labbackend.service.manage.events.DeleteEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeleteEventServiceImpl implements DeleteEventService {

    @Autowired
    private EventMapper eventMapper;

    @Override
    public JSONObject deleteEvent(int id) {

        JSONObject resp = new JSONObject();
        eventMapper.deleteById(id);
        resp.put("error_message", "success");

        return resp;
    }
}
